
import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main, sim_items
from util import *

class Potion(sim_items.Potion):
    def __init__(self):
        sim_items.Potion.__init__(self, "clumsiness", "!",
                ('go', 'have', 'less'),
                idDescription="A staple in the conman's arsenal, this potion "\
                    "is typically quaffed by the scammer before a game of "\
                    "billiards. In the rematch, when the effects have worn "\
                    "off and the wager is doubled, the victim is lucky to "\
                    "walk away with a shirt on his back.")

    def quaff(self, quaffer):
        self.amount = random.randint(2,8)
        self.duration = 30000

        main.schedule(sim.Event('decrease stat', main.schedule.time, (quaffer,
            'dexterityMod', self.amount), dests=[quaffer],
            options={'statusNote+':'clumsy'}))
        main.schedule(sim.Event('increase stat', main.schedule.time +\
            self.duration, (quaffer, 'dexterityMod', self.amount),
            dests=[quaffer], options={'statusNote-':'clumsy'}))
        quaffer.identify(self)

#========================================
thingClass = Potion



